package com.zhentao.controller;


import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.pojo.management.TbRoleMenu;
import com.zhentao.model.common.pojo.management.dto.TbRoleMenuDto;
import com.zhentao.model.common.pojo.pay.CdzZnx;
import com.zhentao.service.ITbRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mp
 * @since 2025-01-03
 */
@RestController
@RequestMapping("/role/menu")
public class TbRoleMenuController {
    @Autowired
    private ITbRoleMenuService tbRoleMenuService;

    @PostMapping("/add")
    public ResponseResult addRoleMenu(@RequestBody TbRoleMenuDto tbRoleMenu){
        return tbRoleMenuService.addRoleMenu(tbRoleMenu);
    }

    @GetMapping("/znx/list")
    public ResponseResult list (CdzZnx cdzZnx){
        ResponseResult result=tbRoleMenuService.List(cdzZnx);
        return result;
    }
}

